package micro.beauty.common.core.constant;
/**
* @Description:    服务返回码
* @Author:         liuliya
* @CreateDate:     2020/6/9 14:40
*/
public enum SysRetCode {

    SUCCESS                             (200, "请求成功"),
    FAILURE                             (400, "请求失败"),

    USER_NOT_EXIST                      (1001, "用户名不存在"),
    USER_PASSWORD_ERROR                 (1001, "用户密码错误"),
    TOKEN_VALID_FAILED                  (1002, "token校验失败"),
    USERNAME_ALREADY_EXISTS             (1003, "用户名已存在"),
    USER_REGISTER_FAILED                (1004,"注册失败，请联系管理员"),
    KAPTCHA_CODE_ERROR                  (1005,"验证码不正确"),
    USER_ISVERFIED_ERROR                (1006,"用户名尚未激活"),
    USER_REGISTER_VERIFY_FAILED         (1007,"用户注册失败插入验证数据失败"),
    USER_INFOR_INVALID                  (1008,"用户信息不合法"),
    ADMIN_ROLE_CANNOT_DELETE            (1009, "超级管理员无法被删除"),
    ROLENAME_ALRAEDY_EXISTS             (1010, "角色名称已经存在"),
    ADMIN_ROLE_ONLY_ONE                 (1011, "超级管理角色只能存在一个"),
    ROLE_ALREADY_OCCUPIED               (1012, "角色被用户占用，无法删除"),
    MENU_ALREADY_OCCUPIED               (1013, "菜单被角色占用，无法删除"),

    REQUEST_FORMAT_ILLEGAL              (1060, "请求数据格式非法"),
    REQUEST_IP_ILLEGAL                  (1061, "请求IP非法"),
    REQUEST_CHECK_FAILURE               (1062, "请求数据校验失败"),
    DATA_NOT_EXIST                      (1070, "数据不存在"),
    DATA_REPEATED                       (1071, "数据重复"),
    REQUEST_DATA_NOT_EXIST              (1072, "传入对象不能为空"),
    REQUEST_DATA_ERROR                  (1074, "必要的参数不正确"),
    REQUISITE_PARAMETER_NOT_EXIST       (1073, "必要的参数不能为空"),
    PERMISSION_DENIED                   (1091, "您没有访问权限"),
    DB_EXCEPTION                        (1097, "数据库异常"),
    SYSTEM_TIMEOUT                      (1098, "系统超时"),
    SYSTEM_ERROR                        (500, "系统错误");

    private int code;
    private String message;

    SysRetCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
